load(
    "//tools/skylark:drake_cc.bzl",
    "drake_cc_googletest",
)
load("//tools/skylark:drake_data.bzl", "models_filegroup")
load("//tools/install:install_data.bzl", "install_data")
load("//tools/lint:lint.bzl", "add_lint_tests")

package(default_visibility = [":__subpackages__"])

models_filegroup(
    name = "glob_models",
    extra_srcs = [
        "LICENSE.TXT",
    ],
)

install_data(
    name = "install_data",
    data = [":glob_models"],
    visibility = ["//visibility:public"],
)

filegroup(
    name = "models",
    srcs = [
        ":glob_models",
        "@drake_models//:allegro_hand_description/meshes/allegro.mtl",
        "@drake_models//:allegro_hand_description/meshes/base_link.obj",
        "@drake_models//:allegro_hand_description/meshes/base_link_left.obj",
        "@drake_models//:allegro_hand_description/meshes/link_0.0.obj",
        "@drake_models//:allegro_hand_description/meshes/link_1.0.obj",
        "@drake_models//:allegro_hand_description/meshes/link_12.0_left.obj",
        "@drake_models//:allegro_hand_description/meshes/link_12.0_right.obj",
        "@drake_models//:allegro_hand_description/meshes/link_13.0.obj",
        "@drake_models//:allegro_hand_description/meshes/link_14.0.obj",
        "@drake_models//:allegro_hand_description/meshes/link_15.0.obj",
        "@drake_models//:allegro_hand_description/meshes/link_15.0_tip.obj",
        "@drake_models//:allegro_hand_description/meshes/link_2.0.obj",
        "@drake_models//:allegro_hand_description/meshes/link_3.0.obj",
        "@drake_models//:allegro_hand_description/meshes/link_3.0_tip.obj",
    ],
    visibility = ["//visibility:public"],
)

# TODO(jwnimmer-tri) Fix Anzu to not need this.
alias(
    name = "prod_models",
    actual = ":models",
    visibility = ["//visibility:public"],
)

# === test/ ===

drake_cc_googletest(
    name = "parse_test",
    data = [":models"],
    deps = [
        "//common:find_resource",
        "//multibody/parsing",
        "//multibody/plant",
    ],
)

add_lint_tests()
